package com.zhuhanpeng.cloud.role.service;

import com.zhuhanpeng.cloud.mybatis.entity.PtRoleEntity;
import com.zhuhanpeng.cloud.mybatis.flexigrid.PadingRstType;
import com.zhuhanpeng.cloud.mybatis.flexigrid.PagingEntity;
import com.zhuhanpeng.cloud.mybatis.ztree.ZtreeEntity;
import com.zhuhanpeng.cloud.role.entity.SearchRoleEntity;

import java.util.List;

public interface RoleService {
    /**
     * 分页查询
     * @param entity
     * @param paging
     * @return
     */
    PadingRstType<PtRoleEntity> queryRoleListByPage(SearchRoleEntity entity, PagingEntity paging);
    /**
     * 根据角色ID获取菜单ztree列表
     * @param roleUuid
     * @return
     */
    List<ZtreeEntity> queryZtreeByRoleId(String roleUuid);

    /**
     * 保存角色和菜单的对应关系
     * @param menuIdArray
     * @param roleUuidArray
     */
    void saveMenuRefRole(String menuIdArray, String roleUuidArray);
    /**
     * 查询菜单的ztree
     * @return
     */
    List<ZtreeEntity> queryMenuZtreeAll();

    /**
     * 根据角色ID增加
     */
    void addroleInfoById(PtRoleEntity entity);

    /**
     * 根据id删角色
     */
    void deleteRoleInfo(String roleUuid);

    /**
     * 根据uid查角色
     */
    PtRoleEntity queryRoleByRoleId(String roleUuid);

    void updateRoleInfoById(PtRoleEntity entity);
}